
/**
 *
 * @author Flávia Veloso Queiroz
 */
package cinema;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;

public class Ator {
    
    private int id;
    private String nome;
    
    Ator(int id) throws MalformedURLException, IOException
    {
        this.id = id;                    
       
        URL url = new URL("http://api.themoviedb.org/3/tv/"+id+"?api_key="
                + "2c179255fe73cce70fbf10d27856228d");
        Scanner scanner = new Scanner(url.openStream());
        String infoAtor = new String();               
              
        while (scanner.hasNext())
        {
            infoAtor += scanner.nextLine();
        }
        
        scanner.close();
        
    }
    
    public int getId()
    {
       return id;
    }
    
     public String getNome()
    {
        return nome;
    }
    
}
